import { EggAppConfig, PowerPartial } from 'egg';

export default () => {
  const config: PowerPartial<EggAppConfig> = {};

  config.sequelize = {
    dialect: 'mysql',
    host: '82.156.175.153',
    port: 3306,
    database: 'test',
    password: '123456',
    // 时区，sequelize有很多自动时间的方法，都是和时区相关的，记得设置成东8区（+08:00）
    timezone: '+08:00',
  };

  // redis配置
  config.redis = {
    client: {
      port: 6379,
      host: '82.156.175.153',
      password: '',
      db: 0
    },
  }

  return config;
};
